<template>
  <div class="img-single">
    <div :style="{ margin: datas.list[0].marginShow ? '10px' : 0 }">
      <img v-if="datas.list[0].image" class="w100" :src="datas.list[0].image" />
      <img v-else class="w100" src="@/assets/images/empty-banner.png" />
      <div
        v-if="datas.list[0].buttonShow"
        :style="{ backgroundColor: datas.list[0].buttonColor, color: datas.list[0].textColor }"
      >
        {{ datas.list[0].buttonText }}
      </div>
    </div>

    <!-- 删除组件 -->
    <slot name="deles" />
  </div>
</template>
<script lang="ts" setup name="ImgSingle">
import { toRefs } from "vue";
const props = defineProps({
  datas: {
    type: Object
  }
});
const { datas } = toRefs(props);
</script>

<!-- <style lang="scss" scoped>
.img-single {
  background-color: #edac2f;
}
</style> -->
